str= input("请输入一段文字：")
fo = open("D:\\hello.txt","w+")
fo.writelines(str)
fo.close()